/*=============================================================================

  MAIN FRAME MODULE

  FILE: mainFrm.h
  
  DESCRIPTION

    Main Frame module

  EXTERNALIZED FUNCTIONS


   Copyright (c) DaeSung Engineering Inc. All rights reserved.

=============================================================================*/
/*=============================================================================

  EDIT HISTORY

  ---------  -------  -------------------------------------------------------
    when       who       what, where, why
  ---------  -------  -------------------------------------------------------
   03/14/04   nso4th    Initial version

=============================================================================*/
#ifndef _MAINFRM_H_
#define _MAINFRM_H_

#pragma once

/*=============================================================================
  HEADER INCLUSION
=============================================================================*/
#include "stdafx.h"
#include <Cust_AppDef.h>
#include <mainView.h>


/*=============================================================================
  CONSTANT DEFINITION
=============================================================================*/

/*=============================================================================
  CMainFrame CLASS DEFINITION
=============================================================================*/
class CMainFrame : public CFrameWnd
{
//---------------------------------------------------------
// CONSTRUTOR
//---------------------------------------------------------
public:
	CMainFrame();
protected: 
	DECLARE_DYNAMIC(CMainFrame)
	
//---------------------------------------------------------
// UI MEMBERS
//---------------------------------------------------------
protected:
#ifdef TG_UI_TOOLBAR
	CToolBar    		m_wndToolBar;
#endif
#ifdef TG_UI_STATUSBAR
	CStatusBar 		m_wndStatusBar;
#endif
	CMainView		m_vwMain;

//---------------------------------------------------------
//	APPLICATION
//---------------------------------------------------------
protected:
	void appInit(void);	
	void appClose(void);
	
	DWORD appMSGHandler(dword type, dword event, dword wp, dword lp);

public:
	void appInitDone(void);
	void appCloseDone(void);
	
protected:
	UImgr		*m_mgrUI;
	SYSmgr		*m_mgrApp;

//---------------------------------------------------------
// PUBLIC MEMBERS
//---------------------------------------------------------
public:
	BOOL WindowCreate(int x, int y, int w, int h, CWnd *pParent);

//---------------------------------------------------------
// VIRTUALS
//---------------------------------------------------------
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
	virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);

// Implementation
public:
	virtual ~CMainFrame();

//---------------------------------------------------------
// MESSAGE MAP
//---------------------------------------------------------
// Generated message map functions
protected:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnClose();

	LRESULT MSG_MsgFunc(WPARAM wParam, LPARAM lParam);
	
	DECLARE_MESSAGE_MAP()
};

#endif // _MAINFRM_H_
